home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-13
/
bined101.zip
/
BINED.DOC
< prev
next >
Wrap
Text File
|
1991-01-13
|
23KB
|
537 lines
Bined",
The Binary File Editor",
(c) Copyright 1990 by Martin Hampford",
Version 1.01 (1-11-90)",
Table of Contents
Purpose.............................1
Packing List........................1
System Requirements.................1
Command Line Arguments..............2,3
Init File & Environment Variables...3
Structure Definition File Format....4
User Interface......................5
Search/Replace Features.............6
First Time Users....................6
Edit Screen Directions..............7
Bug Reporting.......................7
Technical Specs.....................7
Disclaimer..........................8
Shareware Notice....................8
┌────────────────────┐
│ Bined User's Guide │ 1
└────────────────────┘
Purpose
-------
Bined (which stands for BINary EDitor) provides quick and easy
modification of binary (or combined binary & text) data files,
during system development. Other features include:
o Allows editing of binary data fields in a file at the
bit level (or alternately Decimal, Hex, or Octal).
o Allows searching/replacing for Binary values in a data file.
o Allows for quick creation of data files before
your application code has been written or tested.
o Allows programmers to check the validity of data created
during program development/testing.
o Allows for altering data files to test a programs'
error trapping.
Bined was written when a project I was working on kept under-
going changes in the file structures at an almost ludicrous
pace. I got sick of throwing away all of my old test data
and re-compiling the rudimentary data file creator that had
been written.
!!WARNING!!
Please be warned that Bined does not make any assumptions about
the data it is editing so if you use Bined to change the key field
data of an indexed file, it is up to the user to run any reindex-
ing utilities. Also Bined can obviously not do error checking on
the data that is altered or entered so be aware of potential
problems with your application program if invalid data is entered.
Packing List (.zip file)
------------------------
BINED.EXE Bined Executable
BINED.DOC This Document
BINED.INI Contains Default Colors
BINEDINI.IFS initialization files' file structure
System Requirements
-------------------
Bined was written for IBM PC/XT/AT, PS/2 and compatibles.
Bined has been tested under DOS 3.1, 3.2, 3.3, 4.01 and
the DOS Compatibility boxes in OS/2 1.1 and 1.2.
The lowest memory configuration tested has been 512K so that
is the minimum requirement though I don't anicipate any problems
on machines with less memory. In most cases this shouldn't be a
problem because most developers have a configuration that exceeds
this and Bined is not intended for use except by programmers.
┌────────────────────┐
│ Bined User's Guide │ 2
└────────────────────┘
Command Line Arguments
----------------------
Bined can be invoked with no arguments, which will put the user
directly into Edit mode editing the last data file loaded. The
1st invocation of Bined will bring the user to the File Menu.
Arguments may appear in any order as long as they are seperated
by spaces. The valid arguments allowed are described below and
can be preceded by either a backslash (/) or a dash (-) and can
appear in any order on the command line:
o /25 Starts Bined in 25 line mode if the current video state
is 43 or 50 line mode.
o /43 or /50 Starts bined using the 8x8 font available in the
EGA or VGA adaptor.
o /L suppresses display of Bineds' Logo Screen.
o /C tells Bined to skip the Record Count calculation.
This calculation ensures that the file size has no
remainder when if is divided by the record size.
This is done to count the number of records in the file.
The /C parameter tells bined that the file is paged or
extended in chunks that are not a modulus of the file size
(C-tree and Btrieve are examples of data bases that
can extend a data file by a variable page size).
Be warned when attempting to read the last record of a
file extended in pages because you will get an error
message stating that there was a problem reading the
last (partial) record (or slack data area), but you will
be allowed to edit and save it which will extend the
length of the file to a multiple of the record size.
o /S tells bined to load a structure file. There should be
no space between the /s and the filename (which can include
a drive and path qualifier). If no filename extension is
present the default of ".ifs" is used.
ex. bined /s\util\binedini
o /D tells bined to load a data file. If no structure file has
been specified with the /S parameter the data file will
NOT be loaded. Of course a Drive & Path can be included.
If no filename extension is supplied then the default
specified in the bined init file (BINED.INI) is used.
More on BINED.INI later.
ex. bined /s\util\binedini /d\init\bined.bak
┌────────────────────┐
│ Bined User's Guide │ 3
└────────────────────┘
Command Line Arguments (cont.)
------------------------------
o /N tells Bined NOT to automatically load the last data
and structure files. This switch should be used when
you wish to create a new structure and/or data file.
o +<filename> loads both the structure file and the data file
associated with the given filename which must
NOT have a filename extension. If both files
are loaded OK the user will find themselves
directly in EDIT mode.
ex. bined +order - loads order.ifs & order.dat from the
current directory.
o ? will display the valid command line arguments and a brief
summary of each one.
BINED.INI & the Init Environment Variable
-----------------------------------------
Bined will look for (and create it if it doesn't exist) an
initialization file in the directory specified in the INIT
environment variable. If there is no INIT environment variable,
the BINED.INI file will be created in the current directory.
If Bined finds the file BINED.INI in either the INIT directory
or the current directory it will load the last structure and data
file edited (unless another structure or data file is specified
on the command line) and will put you directly into EDIT mode.
The INIT directory is searched before the current directory.
The BINED.INI file is a binary file that contains:
o The names of the last data & structure files used.
o Last record edited.
o The last print device printed to.
o Bined colors.
o Default extensions for the structure file.
o Current Edit base
o Floating point precision value.
The BINED.INI file can be edited with the BINEDINI.IFS structure
file supplied with the BINED zip file.
Remember to edit a COPY of the .INI file and then copy it into
the directory specified by the INIT environment variable or over
the .INI in the current directory.
┌────────────────────┐
│ Bined User's Guide │ 4
└────────────────────┘
Structure/Record Definition File
--------------------------------
Bined uses a straight ASCII file to store its file structures in.
The default extension for these files is ".ifs" though you can load
any file as the definition file so long as it follows the format
described below. (Please understand that this information is
supplied so that you may create the Bined structure definition
file in your preferred text editor or using COPY CON:, as opposed
to using the EDIT->STRUCTURE Submenu function).
Hdr/Rec Specifier (H/R)
│
│ Data Type Size (if type Data Name
│┌────────────┘ (CSHIULNFDAZ) │ is A/Z) │(23 chars max)
││ │ │
││┌┬┬───────────────────────────┘ │
│││││┌───────────────────────────────────────────┘
RA003last_name\r\n
o Bined supports files that contain a Header, so the 1st byte
on the line MUST be either an 'H' or a 'R' in uppercase.
It doesn't matter if the Header or Record is defined 1st as
long as all members of the header or record being defined
are adjacent and in the order that the record is to be
edited in.
This means you CANNOT have a definition as shown below:
RA030last_name\r\n
HLzip_code\r\n <------- this member is part of the header.
RA020first_name\r\n (!WRONG!)
RIcount\r\n
Note that binary type fields have no size parameter because
their size is known implicitly.
All record members must be adjacent to each other.
All header members must be adjacent to each other.
Since Bined was written in C for C programmers it supports
the C data types which match up with their type specifier
below:
Bined
Type
Specifier Data Type Length
--------- --------- ------
C character 1 Byte
S short 2 Bytes
H unsigned short 2 Bytes
I integer 2 Bytes
U unsigned int 2 Bytes
L long 4 Bytes
N unsigned long 4 Bytes
F float 4 Bytes
D double 8 Bytes
E long double 10 Bytes
A char array 2 to 512 Bytes
Z* char Z-array 2 to 512 Bytes Padded with NULLs
* For ASCIIZ Arrays; Only the field size - 1 will be allowed
to be edited so the last character will be forced to a NULL.
o '*' the asterisk can be used to put comments in the structure
file. It MUST be the 1st character on the line and
the comments should not be larger than 120 characters
per line.
o Note that the size field for char arrays & z-arrays MUST
be 3 digits long with leading zeros included as
illustrated above.
The file BINEDINI.IFS is supplied as both an example
file structure and to allow the changing of Bineds colors
and other defaults. Do Not change any of the other fields
unless their usage is obvious (i.e. defualt extension,
last data & structure files).
Any fields not filled in will be padded with NULLs.
┌────────────────────┐
│ Bined User's Guide │ 5
└────────────────────┘
User Interface
--------------
Menus
-----
Menus can be navigated using the following keys:
Home - First Menu Option
End - Last Menu Option
Return - Selects the Currently Hilited Option
or type the hilited hot key to select an option.
Dialogues
---------
The TAB/SHIFT-TAB key shifts the input focus in a dialogue box.
Hilited hot keys are active only when the focus is on a Command
Button, List Box, Check Box [X] or Radio Button (). If the
focus is in a Text input field the hot keys are inactive.
List Boxes
----------
The active movement keys in a list box are:
Home - Moves to the Top of the List
End - Moves to the Bottom of the List
PgUp - Moves back 1 page
PgDn - Moves down 1 page
Return - Selects the current list member (except in the
Structure Edit List Box where a Command Button
must be used for edit actions)
also any 'Hot Keyed' Commands in a dialogue box (see Dialogues
above).
Fields
______
Field edit keys are as follows:
TAB or Down - Next Member/Field
Shift-TAB or Up - Previous Member/Field
Home - Goes to the Beginning of Field
End - Goes to the End of Field (Last Character)
Ctrl-End - Deletes chars from cursor to end of field
BackSpace - Delete character in front of cursor
Delete - Deletes character under cursor.
Escape can be used to exit any field window, dialogue box or menu
(except the Action/System/Main Menu, or whatever you'd like to call
it where you must select FILE->EXIT).
┌────────────────────┐
│ Bined User's Guide │ 6
└────────────────────┘
Search/Search & Replace Features
--------------------------------
One of Bineds' biggest assets is to search or search & replace
a file for either text or binary data.
To activate the Search option use Alt-S while in the Edit
screen. A dialogue box will pop up asking for the field to
search on, the data to search for and the (optional) range
to search (or the whole file). Hit G for GO in any of the
Radio button or Check Box fields (or hilite it using the TAB
key).
Alt-R will activate the Search & Replace Dialogue Box similiar
to the Search dialogue box. The only difference is you can
now access the replacement text field.
Please note that some floating point searches could fail if
you enter less digits in the search field than the number of
digits the number was stored with or if the number cannot be
represented exactly in IEEE floating point format (like .01).
Edit Screen Instructions
------------------------
During editing of data fields you must hit RETURN to save
the changed field to memory. Do NOT enter your data and then
hit a direction key (Tab, Shift-Tab, Up or Down) because this
will restore the original data to the field. Also remember to
save any changed records with the F5 key before you read
another record using F3 or F4 or before exiting the program.
Bined only operates on 1 record at a time so changes made to
a record will be overwritten in memory by the newly read record.
With the BINED.INI init file zipped with the program, data
editable at bit level binary (chars - unsigned longs) are
displayed in green foreground & blue background. Floats -
long doubles are displayed in bright yellow foreground.
Strings/text fields are displayed in bright white on a
blue background.
F1 will provide a brief description of the valid function keys.
F2 allows modification of the files structure.
F3 moves to the previous record
F4 moves to the next record
F5 saves the record to disk
F6 toggles between editing records & appending records
F7 prompts for a record to goto/edit.
F8 changes the current Edit base for chars - unsigned longs.
F9 toggles between the editing the header or records.
F10 Exits to DOS
Alt-R - pops up the Search and Replace Dialogue Box
Alt-S - pops up the Search Dialogue Box
Alt-D - prompts for the display precision for floats - doubles.
Alt-P - prints the current record/header.
┌────────────────────┐
│ Bined User's Guide │ 7
└────────────────────┘
Other Valid Navigation Keys are:
Page Up - Moves Up 1 Page of Members
Page Down - Moves Down 1 Page of Members
TAB or Down - Next Member/Field
Shift-TAB or Up - Previous Member/Field
Home - Goes to Beginning of Field
End - Goes to End of Field (Last Character)
Ctrl-End - Deletes chars from cursor to end of field
BackSpace - Delete character in front of cursor
Delete - Deletes character under cursor.
First Time Users
----------------
When you receive the zip file, unzip it into a directory and
run the program. The .INI supplied will automatically load
the BINEDINI.IFS and the BINED.INI data file. Note the function
keys listed on the bottom row. F10 exits to DOS. Remember to
edit a copy of the .INI file because it will be saved over your
just edited copy when BINED terminates.
Bugs
----
Every effort has been made to ensure data integrity,
(including a 9-month beta test site at my old job! (and my new
one for that matter). But like any complicated software, bugs
can pop up.
Please report any bugs in Bined to me at the address/phone below
or leave me mail at my Compuserve ID below. This also applies
to any comments or questions you might have regarding Bined.
Technical Specs/Assistance
--------------------------
BINED v1.00 - Designed and Coded by
Martin M. Hampford
30 Stevens St. #311
Bridgeport, CT 06606
Voice: (203) 374-0327 Compuserve User ID: 76635,3241
Data: (203) 374-7498
Thanks to David Welch and Karl Bockley for their suggestions and
help in testing Bined in it's pre-release/beta test stages.
Bined was written using BRIEF v2.1, 2.5 and 3.0 starting under
DOS 3.3 and finished under OS/2 1.2.
The compiler used was Microsoft C 5.1 and 6.0/6.0a and a couple
of low-level keyboard routines in 8086 Assembler assembled with
Microsoft MASM 5.1.
NO 3RD PARTY LIBRARIES WERE USED TO IN THE CREATION OF THIS
SOFTWARE.
┌────────────────────┐
│ Bined User's Guide │ 8
└────────────────────┘
Disclaimer
----------
Bined is supplied AS IS. In NO event will I be liable to you
for any damages arising from the use of this program. The
user assumes sole responsibility for the correct use of the
program.
Shareware Notification
----------------------
Bined is shareware. You are granted a license to use the program
for evaluation purposes only and for a period of no more than
30 days. If this program meets your needs, a registration fee of
$25 is requested. This will also ensure you are notified for
future releases of Bined.
End
--